package com.smartcommunity.api.user;

import com.smartcommunity.api.user.fallBack.UserApiFallBack;
import com.smartcommunity.bean.model.Result;

import io.swagger.annotations.ApiOperation;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * @ClassName: UserApi
 * @Description: 调用用户服务接口
 * @author: minsheng
 * @Date: 2019/1/14 15:02
 * @Company:
 * @version V1.5.0
 */
@FeignClient(value = "np-zhsq-user-service",fallback = UserApiFallBack.class)
public interface UserApi {


    /**
     * 新增角色与小区关联
     * @return
     */
    @RequestMapping(method = RequestMethod.POST, value = "/system/addRelRoleVillage", consumes = MediaType.APPLICATION_JSON_VALUE)
    Result addRelRoleVillage(@RequestBody Map<String,Object> param);

    /**
     * 删除角色与小区关联
     * @return
     */
    @RequestMapping(method = RequestMethod.POST, value = "/system/delRelRoleVillage", consumes = MediaType.APPLICATION_JSON_VALUE)
    Result delRelRoleVillage(@RequestBody Map<String,Object> param);

    /**
     * 获取当前用户有权限的小区
     * @param quotationMarks
     * @return
     */
    @GetMapping("/system/getCurrentUserVillage")
    Result getCurrentUserVillage(@RequestParam(name = "quotationMarks",required = false)Integer quotationMarks);

    /**
     * 获取所有用户及角色ID
     *
     * @return
     */
    @RequestMapping(method = RequestMethod.GET, value = "/system/getAllUserRoleId")
    Result getAllUserRoleId();

}
